#ifndef _TIMEIMPL_H_
#define _TIMEIMPL_H_

#include "stdafx.h"

class CTimerImpl : public ITimer, public CUnknownImp
{
public:
    CTimerImpl();
    virtual ~CTimerImpl(void);

    BEGIN_STDCOM_MAP
    STDCOM_INTERFACE_ENTRY(ITimer)
    STDCOM_INTERFACE_ENTRY_UNKNOWN_(ITimer)
    END_STDCOM_MAP
public:
    HRESULT BindEvloop(ioevloop_t* loop);

public:
    // ITimer
    std_method(Start)();
    std_method(Stop)();
    std_method(SetSec)(int isec);
    std_method(Bind)(IBase* pBase);
    std_method(UnBind)();
    std_method_(crtid, GetId)();
    std_method(SetId)(crtid id);

private:
    crtid m_cid;
    _lComPtr<ITimerProc> m_pTimerProc;
};
#endif
